<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      html,
      body {
        margin: 0;
        padding: 0 30px;
      }
      h5 {
        margin-bottom: 0px;
      }
      .container {
        display: flex;
        flex-direction: row-reverse;
        width: 600px;
        height: 160px;
        font-size: 20px;
        line-height: 100px;
        margin-bottom: 26px;
        border: 6px solid tomato;
        color: white;
        text-align: center;
      }
      .container-item{
        height: 100px;
        width: 100px;
      }
      .container-item:nth-child(1) {
        background: yellowgreen;
      }
      .container-item:nth-child(2) {
        align-self: center;
        background: rgb(53, 98, 158);
      }
      .item2:nth-child(2) {
        align-self: flex-end;
      }
      .container-item:nth-child(3){
        background: rgb(65, 21, 77);
      }
      .container-item:nth-child(4) {
        background: rgb(91, 117, 30);
      }
      .container-item:nth-child(5) {
        background: rgb(5, 22, 44);
      }
      .container-item:nth-child(6) {
        background: rgb(104, 69, 114);
      }
      .container-item:nth-child(7) {
        background: rgb(54, 44, 9);
      }
    </style>
  </head>
  <body>
    <h5>1.容器 flex-direction: row-reverse; 第2个项目 align-self: center;</h5>
    <div class="container">
      <div class="container-item">1</div>
      <div class="container-item">2</div>
      <div class="container-item">3</div>
    </div>
    <h5>2.容器 flex-direction: row-reverse; 第2个项目 align-self: flex-end;</h5>
    <div class="container">
      <div class="container-item item2">1</div>
      <div class="container-item item2">2</div>
      <div class="container-item item2">3</div>
    </div>
  </body>
</html>
